#define _CRT_SECURE_NO_WARNINGS	

#include<stdio.h>

int main()
{
    int n;
    scanf("%d", &n);
    double a = 1, b = 1, c, sum = 0;
    while (n--)
    {
        c = a + b;
        sum += c / b;
        a = b;
        b = c;
    }
    printf("%.6f", sum);
    return 0;
}